{extend name="common:base" /}
{block name="page_current"}
<div class="fui-page-group statusbar">
    <div class="fui-page fui-page-current page-shop-goods_category">
        <div class="fui-header">
            <div class="fui-header-left">
                <a class="back"></a>
            </div>
            <div class="title">
                <form method="post" action="./index.php?i=1&amp;c=entry&amp;m=ewei_shopv2&amp;do=mobile&amp;r=goods">
                    <div class="searchbar">
                        <div class="search-input">
                            <i class="icon icon-search"></i>
                            <input type="search" name="keywords" placeholder="输入关键字...">
                        </div>
                    </div>
                </form>
            </div>
        </div>
        <div class="fui-content navbar">
            <div class="fui-fullHigh-group">
                <div class="fui-fullHigh-item menu" id="tab">
                    <nav data-cate="recommend" data-src="" data-href="" class="on">推荐分类</nav>
                    <nav data-cate="1" data-src="" data-href="">娃娃</nav>
                </div>
                <div class="fui-fullHigh-item container" style="position: relative">
                    <div id="container">
                        <div class="fui-icon-group selecter">
                            <a class="fui-icon-col external" href="{:url('Goods/index')}">
                                <div class="icon "><i class="icon icon-app"></i></div>
                                <div class="text">所有商品</div>
                            </a>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <script id="tpl_shop_category_list" type="text/html">
        <%if recommend == 1%>
        <div class="fui-icon-group selecter">
            <a class="fui-icon-col external" href="./index.php?i=1&c=entry&m=ewei_shopv2&do=mobile&r=goods">
                <div class="icon "><i class="icon icon-app" ></i></div>
                <div class="text">所有商品</div>
            </a>
            <%each recommend_children as child%>
            <a class="fui-icon-col external" href="./index.php?i=1&c=entry&m=ewei_shopv2&do=mobile&r=goods&cate=<%child.id%>">
                <div class="icon "><img src="<%child.thumb%>" onerror="this.src='http://hejiangshop.me/addons/ewei_shopv2/static/images/nopic100.png'; this.title='图片未找到.'"></div>
                <div class="text"><%child.name%></div>
            </a>
            <%/each%>
            <%each recommend_grandchildren as grandchild%>
            <a class="fui-icon-col external" href="./index.php?i=1&c=entry&m=ewei_shopv2&do=mobile&r=goods&cate=<%grandchild.id%>">
                <div class="icon "><img src="<%grandchild.thumb%>" onerror="this.src='http://hejiangshop.me/addons/ewei_shopv2/static/images/nopic100.png'; this.title='图片未找到.'"></div>
                <div class="text"><%grandchild.name%></div>
            </a>
            <%/each%>
        </div>
        <%else%>
        <div class="fui-icon-group selecter">
            <%each children as child%>
            <a class="fui-icon-col external" href="./index.php?i=1&c=entry&m=ewei_shopv2&do=mobile&r=goods&cate=<%child.id%>">
                <div class="icon "><img src="<%child.thumb%>" onerror="this.src='http://hejiangshop.me/addons/ewei_shopv2/static/images/nopic100.png'; this.title='图片未找到.'"></div>
                <div class="text"><%child.name%></div>
            </a>
            <%/each%>
        </div>
        <%/if%>
    </script>
    <script id="tpl_shop_category_show_list" type="text/html">
        <div class="fui-icon-group selecter">
            <a class="fui-icon-col prev" data-prev="<%pid%>">
                <div class="icon "><i class="icon icon-toleft"></i></div>
                <div class="text">返回上一级</div>
            </a>
            <%each children as child%>
            <a class="fui-icon-col external" href="./index.php?i=1&c=entry&m=ewei_shopv2&do=mobile&r=goods&cate=<%child.id%>">
                <div class="icon "><img src="<%child.thumb%>" onerror="this.src='http://hejiangshop.me/addons/ewei_shopv2/static/images/nopic100.png'; this.title='图片未找到.'"></div>
                <div class="text"><%child.name%></div>
            </a>
            <%/each%>
        </div>
    </script>
    {include file="common/footer_bar_nav" /}
</div>
{/block}
